package it.uniroma3.dia.ia.textcategorization.datasource;

import it.uniroma3.dia.ia.textcategorization.datasource.odpdump.ODPDump;
import it.uniroma3.dia.ia.textcategorization.texcat.TexCatConfiguration;
import java.util.HashMap;
import java.util.Map;

public final class DataSourceFactory {
	
	private static final Map<String, DataSource> map = new HashMap<String, DataSource>();
	
	public static final String DEFAULT = TexCatConfiguration.getDefaultDataSourceName();
	public static final String ODP_DUMP = "odpdump";
	
	static {
		map.put(ODP_DUMP, new ODPDump());
	}
	
	public static DataSource newDataSource() {
		return map.get(DEFAULT);
	}
	
	public static DataSource newDataSource(String dataSourceName) {
		return map.get(dataSourceName);
	}
	
}
